import request from '@/utils/request'

// 订单初始化
export const apiInitOrder = (params: any) => request.get({ url: '/order/init', data: params })

// 订单下单
export const apiPlaceOrder = (params: any) => request.post({ url: '/order/add', data: params })

// 订单列表
export const apiOrderLists = (params: any) =>
    request.get({ url: '/order/list', data: params }, { ignoreCancel: true })

// 订单详情
export const apiOrderDetail = (params: any) => request.get({ url: '/order/detail', data: params })
// 订单详情
export const getBuyOrder = (params: any) => request.get({ url: '/order/getBuyOrder', data: params })

// 取消订单
export const apiOrderCancel = (params: any) => request.post({ url: '/order/cancel', data: params })

// 删除订单
export const apiOrderDel = (params: any) => request.get({ url: '/order/del', data: params })

// 关闭订单（取消支付）
export const apiOrderClose = (params: any) =>
    request.post({ url: '/pay/wx/closeOrder', data: params })

/** 师傅订单服务 Start **/

// 师傅服务列表
export const apiStaffOrderLists = (params: any) =>
    request.get({ url: '/order/staff/list', data: params }, { ignoreCancel: true })

// 师傅服务详情
export const apiStaffOrderDetail = (params: any) =>
    request.get({ url: '/order/detail', data: params })

// 确认服务
export const apiStaffOrderConfirmService = (params: any) =>
    request.get({ url: '/order/staff/confirm', data: params })

// 核销订单
export const apiStaffOrderVerification = (params: any) =>
    request.get({ url: '/order/staff/verification', data: params })

/** 师傅订单服务 Start **/



// 退款订单-通过订单id
export const apiordergetOrderRefund = (params: any) =>
    request.get({ url: '/order/getOrderRefund', data: params })


// 部分退款-用户进行部分退款
export const apiorderrebates = (params: any) =>
    request.get({ url: '/order/rebates', data: params })
	
	
	
// 请求虚拟号码即可
export const apicallStaffPhone = (params: any) =>
	request.post({ url: '/order/callStaffPhone', data: params })

//联系师傅
export const postcallStaffPhone = (params: any) =>
    request.post({ url: '/order/callStaffPhone', data: params })


export const apigenerationgetCacheCode = (params: any) =>
    request.get({ url: '/generation/getCacheCode', data: params })

export const apigetOrderDetail = (params: any) =>
    request.get({ url: '/order/detail', data: params })
 
export const apigetOrderupdate = (params: any) =>
    request.post({ url: '/order/update', data: params })